package com.fsnbigdata.service.api;
import com.fsnbigdata.domain.*;
import com.fsnbigdata.domain.dto.NamingPair;
import com.fsnbigdata.domain.dto.NamingPair4;
import com.querydsl.core.types.Predicate;
import org.springframework.roo.addon.layers.service.annotations.RooService;
import io.springlets.data.domain.GlobalSearch;
import io.springlets.format.EntityResolver;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * = SpecimenService
 *
 * TODO Auto-generated class documentation
 *
 */
@RooService(entity = Specimen.class)
public interface SpecimenService extends EntityResolver<Specimen, Long> {

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Specimen
     */
    public abstract Specimen findOne(Long id);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     */
    public abstract void delete(Specimen specimen);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entities
     * @return List
     */
    public abstract List<Specimen> save(Iterable<Specimen> entities);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     */
    public abstract void delete(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entity
     * @return Specimen
     */
    public abstract Specimen save(Specimen entity);

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Specimen
     */
    public abstract Specimen findOneForUpdate(Long id);

    /**
     *
     * @param predicate
     * @param pageable
     * @return
     */
    public abstract Page<Specimen> search(Predicate predicate, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @return List
     */
    public abstract List<Specimen> findAll(Iterable<Long> ids);


    /**
     * TODO Auto-generated method documentation
     *
     * @return List
     */
    public abstract List<Specimen> findAll();

    /**
     * TODO Auto-generated method documentation
     *
     * @return Long
     */
    public abstract long count();

    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Specimen> findAll(GlobalSearch globalSearch, Pageable pageable);


    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Specimen> findAll(GlobalSearch globalSearch, Pageable pageable, String creator);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param docsToAdd
     * @return Specimen
     */
    public abstract Specimen addToDocs(Specimen specimen, Iterable<Long> docsToAdd);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param docsToRemove
     * @return Specimen
     */
    public abstract Specimen removeFromDocs(Specimen specimen, Iterable<Long> docsToRemove);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param docs
     * @return Specimen
     */
    public abstract Specimen setDocs(Specimen specimen, Iterable<Long> docs);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param documentsToAdd
     * @return Specimen
     */
    public abstract Specimen addToDocuments(Specimen specimen, Iterable<SpecimenDocument> documentsToAdd);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param documentsToRemove
     * @return Specimen
     */
    public abstract Specimen removeFromDocuments(Specimen specimen, Iterable<Long> documentsToRemove);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param imagesToAdd
     * @return Specimen
     */
    public abstract Specimen addToImages(Specimen specimen, Iterable<SpecimenImage> imagesToAdd);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param imagesToRemove
     * @return Specimen
     */
    public abstract Specimen removeFromImages(Specimen specimen, Iterable<Long> imagesToRemove);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param videosToAdd
     * @return Specimen
     */
    public abstract Specimen addToVideos(Specimen specimen, Iterable<SpecimenVideo> videosToAdd);

    /**
     * TODO Auto-generated method documentation
     *
     * @param specimen
     * @param videosToRemove
     * @return Specimen
     */
    public abstract Specimen removeFromVideos(Specimen specimen, Iterable<Long> videosToRemove);

    List<NamingPair4> findAllByInitial(String name,String value,String initial);

    List<List<Specimen>> findAllByType();

    List<Specimen> findAllByType(Integer type);

    Page<Specimen> findByPageAndSize(Integer type,String creator,String name,String collectDate,String collectLocation, Pageable pageable);//分页查询

    List searchPageList(String name, String status, String collectNumber, String collectPerson, String type, String collectDate, String collectLocation, Pageable pageable);
}
